/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  3.0.x                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvOptions;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


turbine
{
    type            axialFlowTurbineALSource;
    active          on;

    axialFlowTurbineALSourceCoeffs
    {
        fieldNames          (U);
        selectionMode       cellSet; // cellSet || points || cellZone
        cellSet             turbine;
        origin              (0 0 0);
        axis                (-1 0 0);
        verticalDirection   (0 0 1);
        freeStreamVelocity  (10 0 0);
        tipSpeedRatio       6.0;
        rotorRadius         0.45;

        dynamicStall
        {
            active          off;
            dynamicStallModel LeishmanBeddoes;
        }

        endEffects
        {
            active          on;
            endEffectsModel Glauert; // Glauert || Shen || liftingLine
            GlauertCoeffs
            {
                tipEffects  on;
                rootEffects on;
            }
            ShenCoeffs
            {
                c1          0.125;
                c2          21;
                tipEffects  on;
                rootEffects on;
            }
        }

        blades
        {
            blade1
            {
                writePerf   true;
                writeElementPerf true;
                nElements   28;
                elementProfiles
                (
                    cylinder
                    S826
                    S826
                    S826
                    S826
                    S826
                    S826
                    S826
                    S826
                    S826
                    S826
                    S826
                    S826
                    S826
                );
                elementData
                ( // axialDistance, radius, azimuth, chord, chordMount, pitch
                    (0.0 0.0075 0.0 0.0135 0.25 0.0)
                    (0.0 0.049 0.0 0.0135 0.25 0.0)
                    (0.0 0.054999 0.0 0.0495 0.25 38.0)
                    (0.0 0.0675 0.0 0.081432 0.25 37.055)
                    (0.0 0.0824985 0.0 0.08011 0.25 32.544)
                    (0.0 0.0975015 0.0 0.077013 0.25 28.677)
                    (0.0 0.1125 0.0 0.073125 0.25 25.262)
                    (0.0 0.1274985 0.0 0.0690075 0.25 22.43)
                    (0.0 0.1425015 0.0 0.064953 0.25 19.988)
                    (0.0 0.1575 0.0 0.061101 0.25 18.034)
                    (0.0 0.1724985 0.0 0.057519 0.25 16.349)
                    (0.0 0.1875015 0.0 0.054225 0.25 14.663)
                    (0.0 0.2025 0.0 0.0512055 0.25 13.067)
                    (0.0 0.2174985 0.0 0.048447 0.25 11.829)
                    (0.0 0.2325015 0.0 0.0459315 0.25 10.753)
                    (0.0 0.2475 0.0 0.043632 0.25 9.8177)
                    (0.0 0.2624985 0.0 0.0415287 0.25 8.8827)
                    (0.0 0.2775015 0.0 0.0396009 0.25 7.9877)
                    (0.0 0.2925 0.0 0.0378306 0.25 7.2527)
                    (0.0 0.3074985 0.0 0.0362007 0.25 6.565)
                    (0.0 0.3225015 0.0 0.0346968 0.25 5.9187)
                    (0.0 0.3375 0.0 0.0333063 0.25 5.3045)
                    (0.0 0.3524985 0.0 0.0320171 0.25 4.7185)
                    (0.0 0.3675015 0.0 0.03081915 0.25 4.1316)
                    (0.0 0.3825 0.0 0.02970405 0.25 3.5439)
                    (0.0 0.3974985 0.0 0.02866365 0.25 2.9433)
                    (0.0 0.4125015 0.0 0.0276912 0.25 2.2185)
                    (0.0 0.4275 0.0 0.0267804 0.25 1.097)
                    (0.0 0.4424985 0.0 0.02592585 0.25 -0.71674)
                );
            }
            blade2
            {
                $blade1;
                writePerf   false;
                writeElementPerf false;
                azimuthalOffset 120.0;
            }
            blade3
            {
                $blade2;
                azimuthalOffset 240.0;
            }
        }

        tower
        {
            includeInTotalDrag  false; // default is false
            nElements   6;
            elementProfiles (cylinder);
            elementData
            ( // axial distance (turbine axis), height, diameter
                (-0.14 -0.82 0.09)
                (-0.14 -0.66 0.08)
                (-0.14 -0.42 0.06)
                (-0.14  0.00 0.05)
            );
        }

        hub
        {
            nElements   1;
            elementProfiles (cylinder);
            elementData
            ( // axial distance, height, diameter
                (0 0.09 0.09)
                (0 -0.09 0.09)
            );
        }

        profileData
        {
            S826
            {
                data (#include "../../resources/foilData/S826_1e5_Ostavan");
            }
            cylinder
            {
                data ((-180 0 1.1)(180 0 1.1));
            }
        }
    }
}

// ************************************************************************* //
